package com.report.client;

import java.net.MalformedURLException;

import org.codehaus.xfire.XFireFactory;
import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;

import com.report.model.Report;
import com.report.service.ReportServiceHibernate;

public class ReportServiceDelete
{
	public static void main(String[] args)
	{
		Service srvcModel = new ObjectServiceFactory().create(ReportServiceHibernate.class);
		XFireProxyFactory factory = new XFireProxyFactory(XFireFactory.newInstance()
				.getXFire());

		String URL = "http://127.0.0.1:8080/ExtWS/service/ReportServiceHibernate";
		try
		{
			ReportServiceHibernate service = (ReportServiceHibernate) factory.create(srvcModel,URL);

			Report report = new Report("1" , "1" , "1" , "1");
			
			service.deleteByPK(report);

		}
		catch (MalformedURLException e)
		{
			e.printStackTrace();
		}
	}
}
